package icu.zqyhdm.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200,"成功"),
    FAIL(201, "失败"),
    PARAM_ERROR( 202, "参数不正确"),
    NET_ERROR( 203, "服务器网络错误，请稍后再试"),
    CODE_ERROR(210, "验证码错误"),
    REGISTER_ERROR(211, "手机号已被使用"),
    USER_EXIST_ERROR(212, "用户不存在"),
    LOGIN_ERROR(213, "密码错误"),
    AUTHORITY_ERROR(214, "用户权限不足"),
    MESSAGE_ERROR(215, "短信发送失败"),
    TYPE_EXIST_ERROR(216, "你已经创建过该文章类型"),
    TAG_EXIST_ERROR(217, "你已经创建过该文章标签"),
    SYSTEM_ERROR(500, "系统异常"),
    VALID_ERROR(520, "参数格式不正确"),
    ;

    private Integer code;
    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
